(function(angular){
	'use strict';
	angular.module('fs.waf').controller('cda.region.viewController',viewController);
	viewController.$inject = ['$scope', 'Constants', 'layoutConfig', 'validatorConfig', 'gridService', 'authService', 'regionService'];
	function viewController ($scope, Constants, layoutConfig, validatorConfig, gridService, authService, regionService){
		var ctrl = this, regionInfo = $scope.$stateParams.params;
		ctrl.layoutConfig = layoutConfig;
		ctrl.validatorConfig = validatorConfig;
		ctrl.region ={};
		ctrl.init = function (){
			var params = {
				regionCode : regionInfo.regionCode
			};
			return authService.view(params).then(function(response){
				ctrl.region = response.data || regionInfo;
				
			},angular.noop());
		};		
	}	
})(angular);